package fun.lifepoem.controller.common;

import fun.lifepoem.domain.RestResponse;

/**
 * @author Yiwyn
 * @create 2022/7/24 19:51
 */
public class BaseController {


    public <T> RestResponse<T> doSuccess(String message, T data) {
        return RestResponse.doSuccess(message, data);
    }

    public <T> RestResponse<T> doSuccess(T data) {
        return RestResponse.doSuccess("请求成功", data);
    }

    public <T> RestResponse<T> doError(String message) {
        return RestResponse.doError(message);
    }

    public <T> RestResponse<T> doError(String message, T data) {
        return RestResponse.doError(message, data);
    }


}
